//package com.xiao.message.service.handler;
//
//import com.rabbitmq.client.Channel;
//import com.xiao.foundation.constant.RabbitMqConstant;
//import com.xiao.client.blade.dto.MergeUserTransactionDto;
//import com.xiao.message.service.UserNotificationService;
//import lombok.RequiredArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.amqp.rabbit.annotation.*;
//import org.springframework.amqp.support.AmqpHeaders;
//import org.springframework.messaging.handler.annotation.Header;
//import org.springframework.stereotype.Component;
//
///**
// * 合并账号事件
// *
// * @author mingyuezheng
// */
//@Component
//@Slf4j
//@RequiredArgsConstructor
//public class UpdateUserIdHandler {
//
//
//    private final UserNotificationService userNotificationService;
//
//    @RabbitListener(bindings = @QueueBinding(value = @Queue(value = "queue.merge.user.account.message", durable = "true", autoDelete = "false"),
//            exchange = @Exchange(value = RabbitMqConstant.EXCHANGE_FANOUT_MERGE_USER_ACCOUNT, type = "fanout")),
//            ackMode = "MANUAL")
//    @RabbitHandler
//    public void onOrderSubmitted(MergeUserTransactionDto dto, @Header(AmqpHeaders.DELIVERY_TAG) long deliveryTag, Channel channel) throws Exception {
//
//        log.info("开始消费--更新message服务 userId:{}", dto);
//        try {
//            userNotificationService.updateByUserIds(dto);
//
//            channel.basicAck(deliveryTag, false);
//        } catch (Exception e) {
//            log.info("更新message服务 userId: 异常：{}", e.getMessage());
//            e.printStackTrace();
//        }
//
//
//    }
//}